package com.wangsong.service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class Test {
	@Autowired
	private CuratorUtils curatorUtils;
	
	public Map<String, Object> haha(){
		Map<String , Object> map=new HashMap<String, Object>();
		try {
			map.put("getChildren1", curatorUtils.getChildren("/"));
			curatorUtils.createEPHEMERAL("/ahha", "11");
			map.put("getChildren2", curatorUtils.getChildren("/"));
		} catch (Exception e) {
			e.printStackTrace();
		}
		
		return map;
	}
}
